﻿

using Knight.Models.Base;
using Knight.Models.Entity;
using Knlght.Data;
using Knlght.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Knight.Models.Services
{
   public  class NewsTypeService:ServiceBase
    {
        public ActionResponse Add(NewsType model)
        {
            return doAction(() =>
            {
                var db = new RepositoryBase<DataContext>();
                return db.Insert(model,nameof(NewsType.Id),PrimaryKeyType.NextId,"T");
            });
        }
    }
}
